<!DOCTYPE html>
<html>
<head>
    <title><%= title %></title>
    <meta name="description=" content="Learn to Anything is a one-stop-shop for resources to learn more about any real-world topic. Simply enter a topic and begin learning today!">
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <link type="text/css" rel="stylesheet" href="https://www.gstatic.com/freebase/suggest/4_2/suggest.min.css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">


//        $(document).ready( function() {
////
//            $('html, body').animate({ scrollTop: 0 }, 0);
//        } );
    </script>
    <script type="text/javascript" src="https://www.gstatic.com/freebase/suggest/4_2/suggest.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#myinput").suggest({filter:'(all type:/common/topic)', suggest_new:'Search without description...'});
        });

        $(function(){
            $('#stickyribbon').addClass('floating');
        });
    </script>
    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-56524215-1', 'auto');
        ga('require', 'displayfeatures');
        ga('send', 'pageview');

    </script>
</head>
<body>
<div id="header-wrapper">
    <div id="stickyribbon">
        <h1><%= title %></h1>

        <div id="modulecontainer">

            <div id="searchmodule">
                <p>Welcome to <%= title %>, the one-stop-shop for learning to do something new!<br/>
                    Simply enter any real-world topic into the box below and click 'Learn!' to begin crawling the Internet for tutorials</p>
                <form method="get" action="/search/" >
                    "Today I want to learn more about <input id="myinput" size="45" name="query" type="text" value="<%= topic%>"/>
                    <br/>    The Internet can help you with that, come and <input type="submit" value="Learn!"/> </p>
                </form>


            </div>

            <div id="freedescription">
                <%= wikipediaObject %>
            </div>

        </div>
        <div id="feedbackbox">
            <br/>
            <h5>Having trouble? Find a bug? Report it by submitting feedback to
                <a href="mailto:feedback@angryaggregators.org?subject=FEEDBACK%20Regarding%20LearnToAnything" target="_top">
                    feedback@angryaggregators.org</a>
            </h5>
        </div>
    </div>



<div id="bodycontent">
<p>Freebase Description:&#10;
</p>

<p>YouTube videos about <%= topic %>:
<ul>
    <% for(var i=0; i<youtubeObjects.length; i++) { %>
    <li>

        <a href="http://www.youtube.com/watch?v=<%= youtubeObjects[i].id.videoId%>"  target="igoogleFrame">
            <h2><%= youtubeObjects[i].snippet.title%></h2>
        </a>
        <ul>
            <li>
                <a href="http://www.youtube.com/watch?v=<%= youtubeObjects[i].id.videoId%>"  target="_blank">
                    <img src="<%= youtubeObjects[i].snippet.thumbnails.default.url %>" border="0" style="border:none;" alt="YouTube Thumbnail"/>
                </a>

            </li>
            <li>
                <h4>Description:
                    <br/>
                    <%= youtubeObjects[i].snippet.description%></h4>
            </li>
        </ul>
        <hr/>
    </li>
    <% } %>
</ul>

<!--<iframe src="http://angrybrotato.com/#!/" id="googleFrame" name="igoogleFrame">Your browser does not support iFrames! D: Try upgrading to a newer browser or version?</iframe>-->
<!--<br/>-->
<!--<iframe src="http://www.udemy.com" id="youtubeFrame" name="iyoutubeFrame">Your browser does not support iFrames! D: Try upgrading to a newer browser or version?</iframe>-->
<!--<br/>-->
<!--<iframe src="http://www.wikipedia.com/" id="wikiFrame" name="iwikiFrame">Your browser does not support iFrames! D: Try upgrading to a newer browser or version?</iframe>-->
<!--<br/>-->
    </div>
</div>
</body>
</html>
